def count(s):
    digit, letter, space, other = 0, 0, 0, 0
    for i in s:
        if i in '0123456789':
            digit += 1
        elif i in 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz':
            letter += 1
        elif i in ' ':
            space += 1
        else:
            other += 1
    print("数字：{} 字母：{} 空格：{} 其他：{}".format(digit, letter, space, other))


count(input("请输入："))
